package com.wpc.service;

import com.wpc.context.ApplicationContextHelper;

public class WxCjThreadService extends Thread{
	private int start;
	private int max;
	public WxCjThreadService(int start, int max){
		this.start=start;
		this.max=max;
	}
	public void run(){
		Object obj =ApplicationContextHelper.getApplicationContext().getBean("wxNewsService");
		if(obj!=null){
			WxNewsService wxNewsService =(WxNewsService)obj;
			try {
				wxNewsService.ergodicNews(this.start, this.max);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}
}
